/* Fenil Chandarana Fab Academy 2022 Webpage link: https://fabacademy.org/2022/labs/vigyanashram/students/fenil-chandarana/ */ /********************* WARNING! It's very tricky to get it working. Please read this article: http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware You’ll need: - Blynk IoT app (download from App Store or Google Play) - Arduino Uno board - Decide how to connect to Blynk (USB, Ethernet, Wi-Fi, Bluetooth, ...) There is a bunch of great example sketches included to show you how to get started. Think of them as LEGO bricks and combine them as you wish. For example, take the Ethernet Shield sketch and combine it with the Servo example, or choose a USB sketch and add a code from SendData example. *********************/ // Template ID, Device Name and Auth Token are provided by the Blynk.Cloud // See the Device Info tab, or Template settings #define BLYNK_TEMPLATE_ID "TMPLNjQYYM55" #define BLYNK_DEVICE_NAME "ledblink wifi attiny1614" #define BLYNK_AUTH_TOKEN "LwPVmotoDDv_iGr794CbPk3ZwkhczhYF" // Comment this out to disable prints and save space #define BLYNK_PRINT Serial #include #include char auth[] = BLYNK_AUTH_TOKEN; // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "YourWifiSSID"; char pass[] = "YourWifiPassword"; // Hardware Serial on Mega, Leonardo, Micro... //#define EspSerial Serial1 // or Software Serial on Uno, Nano... #include SoftwareSerial EspSerial(8, 9); // RX, TX // Your ESP8266 baud rate: #define ESP8266_BAUD 115200 ESP8266 wifi(&EspSerial); void setup() { // Debug console Serial.begin(115200); // Set ESP8266 baud rate EspSerial.begin(ESP8266_BAUD); delay(10); // Blynk.begin(auth, wifi, ssid, pass); // You can also specify server: Blynk.begin(auth, wifi, ssid, pass, "blynk.cloud", 80); //Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080); } void loop() { Blynk.run(); // You can inject your own code or combine it with other sketches. // Check other examples on how to communicate with Blynk. Remember // to avoid delay() function! }